﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter24.Examples
{
    using System.Xml.Linq;

    public class Code11
    {
        public static void BeginEx07()
        {
            var xmlFileName = @".\customer-orders.xml";
            var customers = XDocument.Load(xmlFileName);
            Console.WriteLine("Elements in loaded documnet:");
            var queryResult =
                from elements in customers.Elements()
                select elements.Name;
            foreach (var item in queryResult)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine("Press Enter/Return to contiune:");
            Console.ReadLine();
        }
    }
}
